#include<iostream>
#include "shapes.h"
using namespace std;


void shapes::setValue(int a, int b)
{
	width = a;
	height = b;
}

int rectangle::getArea()
{
	int area= width * height;
	return area;

}

int triangle::getArea()
{
	int area=width*height*.5;
	return area;
}

void main()
{
	int userInput;
	int userInput2;
	triangle a;
	cout<<"please enter the base of a triangle"<< endl;
	cin>> userInput;
	cout<<"please enter the height of a triangle" << endl;
    cin>>userInput2;
	a.setValue(userInput, userInput2);
	cout << "the area is " << a.getArea() << endl;


system("pause");
}